#pragma once
#include "ASN1Encodable.h"

namespace AppliedCryptography
{
	namespace AC = AppliedCryptography;

	class ASN1BitString : public ASN1Encodable
	{
	private:
		std::vector<byte> _value;
		//int _unused; // number of unused bits

	public:
		ASN1BitString();
		ASN1BitString(const char* value);
		explicit ASN1BitString(const std::vector<byte>& value);
		explicit ASN1BitString(const std::string& value);
		ASN1BitString(const byte* value, int length);

	public:
		virtual ASN1BitString& set(const byte* value, int length);
		virtual ASN1BitString& set(const std::vector<byte>& value);
		virtual ASN1BitString& set(const std::string& value);
		virtual void operator=(const std::vector<byte>& value);
		virtual void operator=(const std::string& value);
		virtual unsigned int size() const;

	public:
		virtual std::vector<byte> get() const;
		virtual std::string getString() const;

	public:
		virtual std::vector<byte> getContentBits() const;
	};
}; // namespace AppliedCryptography
